package com.linkstec.mail;

import java.util.ArrayList;
import java.util.List;

public class SendMailToSomeone {

	public static void main(String []args){
		
//		SendMailToSomeone sts=new SendMailToSomeone();
//		sts.send("实验", "你好！这是我通过javaMail发送的一封邮件", "252745361@qq.com",
//				"397519892@qq.com", "expoubophdyhbgce", "smtp.qq.com");
//		sts.send("实验", "你好！这是我通过javaMail发送的一封邮件", "liuyl@linkstec.com",
//				"397519892@qq.com", "expoubophdyhbgce", "smtp.qq.com");
		//标题
		String subject = "javamail实验标题333";
		//内容
		String body = "你好！这是我通过javaMail发送的一封邮件";
		//收件人
		String recipientsTo = "liuyl@linkstec.com";
//		String recipientsTo = "252745361@qq.com";
		//抄送
		List<String> cc = new ArrayList<String>();
		cc.add("luqixi@163.com");
		//密送
		List<String> bcc = new ArrayList<String>();
//		bcc.add("liuyl@linkstec.com");
		bcc.add("252745361@qq.com");
		
		try {
            MysendMail.send(subject, body,
            		recipientsTo, cc, bcc);
        } catch (Exception e) {
        }
	}
	
}
